﻿<Window x:Class="TorchView.SharedStashEditor.Views.EditDamageBonusView" 
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:src="clr-namespace:System;assembly=mscorlib"
        xmlns:game="clr-namespace:TorchView.Game;assembly=TorchView.Common"
        Title="Edit Damage:" 
        WindowStartupLocation="CenterScreen" 
        Style="{StaticResource DialogWindowStyle}">

    <Window.Resources>
        <ObjectDataProvider  MethodName="GetValues"
                             ObjectType="{x:Type src:Enum}" x:Key="DamageTypes">
            <ObjectDataProvider.MethodParameters>
                <x:Type TypeName="game:DamageSourceType"></x:Type>
            </ObjectDataProvider.MethodParameters>
        </ObjectDataProvider>
    </Window.Resources>

    <Grid Margin="7">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>
        <StackPanel Orientation="Vertical" Grid.Row="0" Grid.ColumnSpan="2" Margin="0,7" Width="200">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>

                <ListBox Grid.Row="0" Grid.ColumnSpan="2" Name="DamageType" ItemsSource="{Binding DamageSourceTypes}" SelectedItem="{Binding Damage.Type}"></ListBox>
                <Label Grid.Row="1" Grid.Column="0" Target="{Binding ElementName=Damage}" Foreground="{StaticResource HighlightedTextBrush}">Damage:</Label>
                <TextBox Grid.Row="1" Grid.Column="1" Name="Damage" Text="{Binding Damage.Damage}"></TextBox>
            </Grid>
        </StackPanel>
        <Button Grid.Row="2" HorizontalAlignment="Right" Content="OK" IsDefault="True" Command="{Binding OKCommand}" Margin="7,0" />
        <Button Grid.Row="2" Grid.Column="1" HorizontalAlignment="Right" Content="Cancel" IsCancel="True" />
    </Grid>
</Window>

